package com.sk.weichat.helper;

import android.content.Context;

public class SharedPreferenceHelper {

    /* 保存服务器获取的版本号   版本更新判断用到*/
    public static void setVersionCode(Context context,int versioncode){
        PreferenceHelper.write(context,"updata","versioncode",versioncode);
    }
    public static int GetVersionCode(Context context){
        return PreferenceHelper.readInt(context, "updata","versioncode");
    }

    /*保存公开群提示状态*/
    public static void setOpenGroupTips(Context context,String roomid,boolean isShow){
        PreferenceHelper.write(context,"open_group",roomid,isShow);
    }

    public static boolean getOpenGroupTips(Context context,String roomid){
        return PreferenceHelper.readBoolean(context,"open_group",roomid,true);
    }

    /*
    * 首页通知栏提示开启是否提示过
    * */
    public static void setNotificationTips(Context context,boolean isShow){
        PreferenceHelper.write(context,"message","notification",isShow);
    }
    public static boolean getNotificationTips(Context context){
        return PreferenceHelper.readBoolean(context,"message","notification",false);
    }
}
